<template>
  <div class="c-tools-doc">
    <div class="title">
      <div :class="{ active: tabIndex === 0 }" @click="tabIndex = 0">工具下载</div>
      <div :class="{ active: tabIndex === 1 }" @click="tabIndex = 1">宣传资料</div>
    </div>

    <div class="c-contet">
      <tools :class="{ hide: tabIndex !== 0 }"></tools>
      <docs :class="{ hide: tabIndex !== 1 }"></docs>
    </div>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import Tools from "./tools.vue";
import Docs from "./docs.vue";

@Component({
  name: "CToolsDoc",
  components: {
    Tools,
    Docs
  }
})
export default class CTabs extends Vue {
  private tabIndex = 0;
}
</script>

<style lang="less" scoped>
@import "~@/assets/style/mixin.less";
.c-tools-doc {
  .scale(width, 920px);
  // box-shadow: 0px 0px 10px 0px rgba(83, 112, 239, 0.22);
  .title {
    color: #63696f;
    display: flex;
    align-items: center;
    font-size: 16px;
    margin-bottom: 14px;
    justify-content: flex-start;
    .scale(height, 52px);

    & > div {
      padding: 4px 16px;
      cursor: pointer;
    }

    & > div:last-child {
      margin-left: 20px;
    }

    .active {
      background: #56a8f0;
      border-radius: 18px;
      color: white;
    }
  }

  .c-contet {
    .scale(height, 317px);
    background: #ffffff;
    overflow: hidden;
    position: relative;
    box-shadow: 0px 0px 10px 0px rgba(83, 112, 239, 0.22);
  }

  .hide {
    height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
  }
}
</style>
